aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/[id].js
blob: a58d02a1760dba7a3fdc6e2da147f79eb89b7c22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { get } from '$lib/utils';

export async function GET({ params }) {
	let { id } = params;
	let {
		amount,
		rate,
		status,
		text,
		user: { username }
	} = await get(`/invoice?uuid=${id}`);

	return { body: { amount, id, rate, username, status, text } };
}